﻿<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<script type="text/javascript" src=" http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" charset="utf-8"></script>
<!--<script src="./微伯乐 - 基于新浪微博的微博招聘信息服务平台_files/__boot__.js" type="text/javascript"></script> -->
 <script src="./微伯乐 - 基于新浪微博的微博招聘信息服务平台_files/index_login.js" type="text/javascript" charset="gbk"></script>
<link href="./微伯乐 - 基于新浪微博的微博招聘信息服务平台_files/common.css" type="text/css" rel="stylesheet">
<!--<link href="./微伯乐 - 基于新浪微博的微博招聘信息服务平台_files/index_login.css" type="text/css" rel="stylesheet"> -->
<script>  

(function() {
    var show = function(dom, textDom) {
        var str = dom.value;
        textDom.innerHTML = Math.floor((140 - q.string.byteLength(str)/2)<0?0:(140 - q.string.byteLength(str)/2));
        if(q.string.byteLength(str)>280) {
            dom.value = q.string.leftB(str, 280);
        }
    };

    window.messageTrans = function(mid) {   //mid->m
        var tpl = [
            '<div style="font-size:12px;">转: '+$qe("message_"+mid).innerHTML+'</div>',
            '<div style="text-align:right;font-size:12px;">还可以输入<span id="trans_limit" style="font-size:14px;color:#399FD6;background:none;">140</span>个汉字</div>',
            '<div><textarea id="trans_info" style="background:#F9FBF0;border:1px solid #ccc;resize:none;width:380px;height:120px"></textarea></div>'
        ]; 										 //输入框

        var dialog = new q.ui.pop().create(tpl.join(""), {
            width:420,
            height:'auto',
            title:'转发该微博',
            onSubmit:function() { 
                if($qe("trans_info").value.length<1) {   //取要转发的微博的内容
                    $qe("trans_info").value = '';
                }

              q.io.ajax.request("http://www.movie3.com/movie/comments/rt/9302084239", {
			
                    method:"POST",
                    returnType:'txt',
                    POST:{
						submit:true,
						//formhash:Session.formhash,
						//op:"repost",
						//msgid:mid,
						//rt:$qe("trans_info").value
                    },
					
                    onComplete:function(response) {
                    	if(response.indexOf("1")>-1) {
                            dialog.close();
                            q.ui.pop.alert("转发成功!", 1500);
                        }else {
                            $qe("trans_info").style.border = "1px solid #d90000";
                            q.ui.pop.alert("转发失败!或许该微博已被删除,你懂的", 1500);
                        }
                    },
                    onException:function(response) {
                    		q.ui.pop.alert("发表评论失败!请坐下来喝杯茶再试一试?", 1500);
                    }
                });
            },
            onCancel:function() {
                dialog.close();
            }
        });
        
        dialog.open();
        
        q.event.add($qe("trans_info"), function() {
            show($qe("trans_info"), $qe("trans_limit"));   
        }, 'propertychange');
        q.event.add($qe("trans_info"), function() {
            show($qe("trans_info"), $qe("trans_limit"));
        }, 'input');
    };

    window.messageComment = function(mid) {
        var tpl = [
        		'<div style="text-align:right;font-size:12px;">还可以输入<span id="comment_limit" style="font-size:14px;color:#399FD6;background:none;">140</span>个汉字</div>',
            '<div><textarea id="comment_info" style="background:#F9FBF0;border:1px solid #ccc;resize:none;width:380px;height:120px"></textarea></div>'
        ];
        var dialog = new q.ui.pop().create(tpl.join(""), {
            width:420,
            height:'auto',
            title:'评论该微博',
            onSubmit:function() {
                if($qe("comment_info").value.length<2) {
                    $qe("comment_info").style.border = "1px solid #d60000";
                    q.ui.pop.alert("请填写评论内容", 1500);
                    return;
                }

                q.io.ajax.request("http://tbole.com/post.php", {
                    method:"POST",
                    returnType:"txt",
                    POST:{
                        info:$qe("comment_info").value,
                        op:"comment",
                        formhash:Session.formhash,
                        cmsgid:mid,
                        submit:true
                    },
                    onComplete:function(response) {
                        if(response.indexOf("1")>-1) {
                            dialog.close();
                            q.ui.pop.alert("评论成功!", 1500);
                        }else {
                            $qe("comment_info").style.border = "1px solid #d90000";
                            q.ui.pop.alert("评论失败!请检查一下评论内容,你懂的", 1500);
                        }
                    },
                    onException:function(response) {
                        q.ui.pop.alert("发表评论失败!请坐下来喝杯茶再试一试?", 1500);
                    }
                });
            },
            onCancel:function() {
                dialog.close();
            }
        });

        dialog.open();
        
        q.event.add($qe("comment_info"), function() {
            show($qe("comment_info"), $qe("comment_limit"));   
        }, 'propertychange');
        q.event.add($qe("comment_info"), function() {
            show($qe("comment_info"), $qe("comment_limit"));
        }, 'input');
    };

    window.fav = function(mid) {
        q.io.ajax.request("http://tbole.com/opt.php", {
            method:"GET",
            returnType:"txt",
            GET:{
                op:"fav",
                id:mid
            },
            onComplete:function(response) {
                if(response.indexOf("1")>-1) {
                    q.ui.pop.alert("收藏成功!", 1500);
                }else {
                    q.ui.pop.alert("收藏失败~稍等一下，再试一次", 1500);
                }
            },
            onException:function(response) {
                q.ui.pop.alert("系统返回错误，也许我们正在修复中", 1500);
            }
        });
    };
})();


</script>

    <title>JQuery测试 </title> 
    <style type="text/css"> 
               /*table中偶数行*/ 
        .tabEven { 
            background: #ff0000; 
        } 
             /*table中奇数行*/ 
        .tabOdd { 
            background: #00ff00; 
        } 
    </style> 

    <script language = "JavaScript" type="text/javascript"> 
        // <![CDATA[ 
        $(document).ready(function(){ 
            $("#tabTest tr:even").addClass("tabEven"); 
            $("#tabTest tr:odd").addClass("tabOdd"); 
        }); 
        //]]> 
    </script> 
</head> 
<body>
<p>&nbsp;</p>
<div class="item_info">
                        <p id="message_9211838671" class="wordwrap"><a href="http://weibo.com/sunny29957083" target="_blank">sunny陈</a>：我发布了活动“注册公用设备工程师（给排水、暖通、电气）专场网络招聘会”<a href="http://t.cn/hrEBL1" target="_blank" rel="nofollow">http://t.cn/hrEBL1</a> @河南设计英才网 @深大建规系刊 </p>
<div class="item_plus" style="font-size:12px;">
<div class="plus_left"><span class="time_text"><a href="http://tbole.com/opt.php?op=wburl&muid=1705602977&id=1jxo8bg" target="_blank" class="color7"><span title="2011-04-16 23:39">昨天&nbsp;23:39</span></a></span><span class="from_text"><a href="http://event.t.sina.com.cn/" target="_blank" rel="nofollow">活动</a></span>
</div>
<!--
<div class="plus_right">
<span>(40)<a class="button_good" href="#">支持</a></span>
<span>(62)<a class="button_bad" href="#">反对</a></span>
</div>-->
</div>
                        <div class="spacer"></div>
                        <div style="float:left;height:20px;font-size:12px;">
                                                        <span class="about_text">相关招聘：</span>
                                                        <span><a href="http://tbole.com/search.php?searchid=722" target="_blank">网络</a></span>
                                                                                </div>
<div class="about_right" style="font-size:12px;">
    <div class="messageBtns" style="">
                                <div style="float:right;margin-right:10px;"><a href="javascript:;" onClick="fav(&#39;1jxo8bg&#39;)">收藏</a></div>
                                <div style="float:right;margin:0px 10px;"><a onClick="messageComment(&#39;1jxo8bg&#39;);" href="javascript:;">评论(1)</a></div>
                                <div style="float:right"><a onClick="messageTrans(9211838671);" href="javascript:;">转发(3)</a></div>
                            </div>
                        </div>
</div>
</body> 
</thml> 
